**# Bookmark #1 Setting

*Windows
global root  = "G:/Dropbox/Environmental Injustice/Empirical"
global rawdata = "$root/rawdata"
global workdata = "$root/workdata"
global results = "$root/results"
global outfile = "$root/outfile"

cd "$workdata"

**# Bookmark #2.1 City-level

use "$outfile/City_regression.dta",clear

reghdfe codemission c.belowcl_median##i.post,absorb(i.city i.province#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S15.xls",replace ctitle("City-level COD Emission") ///
keep(1.post#c.belowcl_median belowcl_median 1.post) ///
addtext(City FE, YES, Firm FE, NO, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)

use "$outfile/City_regression.dta",clear

reghdfe codemission c.belowcl_mean##i.post,absorb(i.city i.province#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S15.xls",append ctitle("City-level COD Emission") ///
keep(1.post#c.belowcl_mean belowcl_mean 1.post) ///
addtext(City FE, YES, Firm FE, NO, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)


**# Bookmark #2.2 Firm-level
use "$outfile/Firm_regression.dta",clear

reghdfe codemission c.belowcl_median##i.post,absorb(i.id i.province#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S15.xls",append ctitle("Firm-level COD Emission") ///
keep(1.post#c.belowcl_median belowcl_median 1.post) ///
addtext(City FE, NO, Firm FE, YES, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)

reghdfe codemission c.belowcl_mean##i.post,absorb(i.id i.province#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S15.xls",append ctitle("Firm-level COD Emission") ///
keep(1.post#c.belowcl_mean belowcl_mean 1.post) ///
addtext(City FE, NO, Firm FE, YES, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)
